package cola0502.project.hellospringbootcola0502.controller;

import cola0502.project.hellospringbootcola0502.service.AsyncService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/v1/api/asyncs")
public class AsyncController {

    @Resource
    AsyncService asyncService;

    @GetMapping("testAsync")
    public String testAsync() {
        asyncService.testAsyncTask();
        return "testAsync";
    }
}
